Fast Parabolic Fitting: An R-Peak Detection Algorithm for Wearable ECG Devices

Heart diseases rank among the most fatal health concerns globally, with the majority being preventable through early diagnosis and effective treatment. Electrocardiogram (ECG) analysis is critical in detecting heart diseases, as it captures the heart’s electrical activities. For continuous monitoring, wearable electrocardiographic devices must ensure user comfort over extended periods, typically 24 to 48 h. These devices demand specialized algorithms with low computational complexity to accommodate memory and power consumption constraints. One of the most crucial aspects of ECG signals is accurately detecting heartbeat intervals, specifically the R peaks. In this study, we introduce a novel algorithm designed for wearable devices, offering two primary attributes: robustness against noise and low computational complexity. Our algorithm entails fitting a least-squares parabola to the ECG signal and adaptively shaping it as it sweeps through the signal. Notably, our proposed algorithm eliminates the need for band-pass filters, which can inadvertently smooth the R peaks, making them more challenging to identify. We compared the algorithm’s performance using two extensive databases: the meta-database QT database and the BIH-MIT database. Importantly, our method does not necessitate the precise localization of the ECG signal’s isoelectric line, contributing to its low computational complexity. In the analysis of the QT database, our algorithm demonstrated a substantial advantage over the classical Pan-Tompkins algorithm and maintained competitiveness with state-of-the-art approaches. In the case of the BIH-MIT database, the performance results were more conservative; they continued to underscore the real-world utility of our algorithm in clinical contexts.


Introduction
The electrocardiogram (ECG) allows for the convenient measurement of cardiac electrical activity.Successive waveforms, known as the P wave, QRS complex, and T wave, characterize each cardiac cycle on the ECG.These waveforms represent the depolarization and repolarization activities in the cells of the atrium and ventricle.Automatic detection of ECG waveforms provides essential information for diagnosing cardiac disease.This broad field continues to be an active research topic, as evidenced by recent publications [1,2].Due to the significant morphological variation of ECG signals, it is not easy to design automatic and widely applicable algorithms.This difficulty partly explains the continuous effort made by researchers in ECG signal processing.ECG detection algorithms aim to improve classification accuracy and are becoming as reliable and successful as expert cardiologists.
Researchers have extensively investigated automatic R-peak detection as a classic ECG signal processing problem.The well-known real-time R-peak detection algorithm was proposed by Pan-Tompkins [3].This classical algorithm can process and display the detection result for each sample after a learning period.However, the complexity of the Pan-Tompkins algorithm is high, and the detection accuracy is moderate compared with recently developed algorithms [1,4,5].
Several notable studies have recently been conducted [4,6,7].However, a problem with most R-peak detection algorithms is that the computational complexity could be higher, and they require impractical assumptions, e.g., they usually need a global statistical knowledge of the entire input signal [3,[8][9][10][11].
On the other hand, researchers have focused on developing efficient sensing algorithms suitable for wearable ECG devices [5,[12][13][14][15].The authors proposed a simple real-time Rpeak detector with low computational cost [16].As in many previous works, the authors of [15] customized the input parameters of the algorithm for optimal performance on the MIT-BIH arrhythmia database, which may not be suitable for other databases.Moreover, it is not robust to noise.According to the comprehensive review by the authors, several studies are mentioned in Chapter 4 that achieve a transcendental level of success in determining the R peak.Nevertheless, the algorithm's performance is susceptible to heart rate variations.
Researchers have successfully used two-parameter parabolic fitting to detect R points of ECG signals [1,7].However, these methods are not suitable for wearable devices since they use computationally complex processes such as high-order band-pass filters, isoelectric line localization, and wavelet filtering.Additionally, one needs a comprehensive understanding of the complete ECG signal.
The proposed method utilizes single-parameter parabolic fitting to extract a feature known as parabolic height.This feature detects partial P peaks, or candidates, by comparing them with a parabolic height threshold.Then, the best candidates are designated as R points of the ECG signal.Afterwards, this threshold is adapted to different signal amplitudes.The proposed algorithm does not require calculating and estimating the isoelectric line of the ECG signal, nor does it require any prior filtering.The authors tested the algorithm on two databases, QT and BIH-MIT.The results show that the proposed algorithm performs very well compared to previous work in terms of robustness to noise and reduced computational resources.It is essential to highlight that the algorithm presented in this document improves the performance of the previous algorithm, called LDR, by reducing the number of operations and the performance of the detection of maximum and minimum points.

Materials and Methods
This paper proposes a novel algorithm for R-peak detection, considering the limitations of computational resources commonly found in wearable ECG devices.We tested the algorithm for detecting R peaks in ECG signals from two widely used research databases: the QT database and BIH-MIT database.These ECG signals were obtained following ethical guidelines, as reported in [17][18][19][20].We conducted all programming for this work on the MATLAB platform.
The QT database contains a total of 105 15 min ECGs.We chose the ECGs in this database to represent various QRS and ST-T morphologies with real-world variability, aiming to challenge detection algorithms [18].The sampling rate in this database is 360 Hz, allowing for a total of 86,995 beats from 82 recordings to be stored, and the remaining 23, sel30-sel52, were not considered due to the absence of QRS annotations.This number is consistent with the results of other studies [5].
The BIH-MIT database contains 48 ECG records, each containing a 30 min ECG signal [19].They used the entire dataset, totaling 109,490 beats.Twenty-five recordings contain fewer common arrhythmias.The recordings have a sampling rate of 360 Hz with a resolution of 11 bits at a 10 mV interval.The ECG recordings have acceptable quality, high and sharp P and T waves, negative R waves, small R peak amplitudes, wider R waves, muscle noise, deviation from baseline, sudden changes in beat morphology, multiform PVCs, long pauses, and irregular heart rhythms.
This work ignores all non-beat annotations defined by Physionet [19].Note that both databases offer two channels of ECG signals.This study used only the first channel to develop and test the algorithm.
To be consistent with most of the R-peak detection studies [3,5,[8][9][10][11][12]14,15], we used quantitative comparisons in terms of sensitivity (S), positive predictability (P), and detection error (DER), as defined in Equations ( 1)-(3): The true positive (TP) is defined as the number of R peaks detected, false negative (FN) is the number of true R peaks that was not detected, and false positive (FP) is the number of detected R peaks that is not detected.Sensitivity represents the percentage of true beats correctly detected, whereas positive predictability presents the percentage of true beats detected.
A problem with the BIH-MIT and QT databases is that the beat annotations are often not located at peak R.This poses a severe problem when evaluating the detectors, as it introduces a temporal fluctuation in the time stamps of peak R. For this reason, we made a readjustment to the original annotations.After applying the algorithm to each recording, they automatically calculated the TP, FN, and FP indices using the new beat annotations, with a tolerance of 40 ms [20].This tolerance is consistent with similar work, although sometimes implicit.

Fast Parabolic Fitting for ECG Signals
Parabolic fitting aims to extract from a neighborhood of a point in the ECG signal a feature that indicates that the point is the R point and that the neighborhood is part of the R peak.Parabolic fitting has already been successfully applied in the analysis of ECG signals [1,17].One of the significant advantages of parabolic fitting is that it is not necessary to calculate the isoelectric line of the ECG signal.However, in such schemes, a parabola fitting uses two parameters: window width and parabola height, increasing the computational cost and affecting the performance of wearable devices.The computational cost increases by the number of additional operations required, such as 6L + 2 additions, 2L + 4 multiplication, and 2 divisions.
In response to the prior inconveniences, we have introduced a novel approach to parabolic fitting, employing only one parameter.This modification substantially reduces the number of addition and multiplication operations, effectively improving the computational cost, a critical factor in enhancing the performance of wearable devices.Furthermore, our approach eliminates division operations, resulting in a more efficient and streamlined process.Figure 1 shows the parabolic approximation at an R peak.
For each point (n, y(n)) of the ECG signal, the best fitting parabola has the follow- ing form: where i ∈ {n − w, . . ., n − 1, n, n + 1, . . ., n + w}, y(n) is the original ECG signal, a(n − i) 2 is the parabola, and y (n) is the adjustment of the signal ECG with the fitting parabola.For each point (, ()) of the ECG signal, the best fitting parabola has the following form: where  ∈  − , … ,  − 1, ,  + 1, … ,  +  , y(n) is the original ECG signal, a(n − i) 2 is the parabola, and y'(n) is the adjustment of the signal ECG with the fitting parabola.This adjustment in the equation allows us to extract from a neighborhood of values the representative values that can be adjusted to a maximum or minimum value in the analysis window, allowing us to improve detection and ensure that detection is successful.The length of a window is The polynomial coefficient a is calculated by minimizing the following quadratic error criterion: The first derivative of () is computed as Since The error () = ′() − (), therefore To minimize the criterion of Equation ( 4), the following equation must be solved: This adjustment in the equation allows us to extract from a neighborhood of values the representative values that can be adjusted to a maximum or minimum value in the analysis window, allowing us to improve detection and ensure that detection is successful.The length of a window is The polynomial coefficient a is calculated by minimizing the following quadratic error criterion: The first derivative of V(a) is computed as Since ∂e(i) ∂a The error (i) = y (i) − y(i), therefore To minimize the criterion of Equation (4), the following equation must be solved: Sensors 2023, 23 Given that and Equation ( 13) is simplified Calculation for the coefficient a at each sample of the ECG signal requires L + 1 additions and 2 multiplications, which makes this algorithm more suitable for implementation on low-cost microprocessors.On the other hand, if a is negative, it indicates that the peak is upward, and if positive, the peak is downward.The parabola defined with the optimal parameter of Equation ( 16) is called the best-fit parabola.
The parabolic height (H) is defined as the absolute of the difference between the highest point and the lowest point of the best-fit parabola, which is computed as shown in (17) and this value H is used to detect the R peaks: Figure 2 shows four parabolic approximations at different discrete time instants: n = 158, n = 186, n = 196, and n = 265.In the first case H = 0.03, it is easy to see that there is no peak.In the second case, the P wave is present with H = 0.25.In the third case, it does correspond to an R peak with H = 3.42.In the fourth case it is H = 0.25, even though the peak is downward.The natural strategy is to propose a threshold H th , such that if H > H th , then at time n there is an R peak.In each of the analysis windows, a value of H was obtained, where this coincides with the maximum value in height, and in the last point, it was established as a minimum value.
Figure 3 shows one of the biggest problems faced by R-peak detection algorithms in ECG signals.The figure shows an R peak in the sel808 recording and a noise peak in the sel102 recording.Both signals, from the QT database, have different isoelectric lines.The R peak has a parabolic height of H = 1.1 and the false peak is higher with H = 1.6.Under the threshold strategy of H th = 1.5, the false peak would result in a false positive and the R peak would result in a false negative.The need arises for H th to be variable, depending on the typical amplitude of the R peaks in the signal.

Fast Parabolic Fitting Algorithm R Peak for Detection
In general, the algorithm consists of four processes:  calculation for each sample, searching for R peak candidates, searching for the best candidate for R peak, and adaptation of the parabolic height threshold ( ), see Figure 4.

Fast Parabolic Fitting Algorithm R Peak for Detection
In general, the algorithm consists of four processes:  calculation for each sample, searching for R peak candidates, searching for the best candidate for R peak, and adaptation of the parabolic height threshold ( ), see Figure 4.

Fast Parabolic Fitting Algorithm R Peak for Detection
In general, the algorithm consists of four processes: H calculation for each sample, searching for R peak candidates, searching for the best candidate for R peak, and adaptation of the parabolic height threshold (H th ), see Figure 4.Each ECG signal sample has its parabolic height () calculated, and if  >  , then that time is defined as an R-peak candidate.If a candidate has been the best candidate for a certain time, it is recorded as an R peak, then the  threshold is updated.
The search for the best candidate starts when the first candidate is found and ends when a discrete time  elapses without the best candidate being replaced.For an ECG signal point to be detected as an R peak, it must first be detected to pass as a candidate, then as a best candidate, and remain as such for  samples.If a signal R peak does not pass any of these three stages, it will be discarded, which will cause the number of false positives to increase.
For instance, with a threshold of  = 2.1, , the search for the best candidate ends, and it is designated that at  = 196, there is an R peak.In ECG signals, there is a large variability in the amplitude of R peaks; therefore, it is not possible to select a fixed value for  .If the  threshold is quite large, more points with low parabolic height will qualify as candidates and it becomes more likely that the number of false positives will increase.Conversely, if the  threshold is quite small, a  Each ECG signal sample has its parabolic height (H) calculated, and if H > H th , then that time is defined as an R-peak candidate.If a candidate has been the best candidate for a certain time, it is recorded as an R peak, then the H th threshold is updated.
The search for the best candidate starts when the first candidate is found and ends when a discrete time n cand elapses without the best candidate being replaced.For an ECG signal point to be detected as an R peak, it must first be detected to pass as a candidate, then as a best candidate, and remain as such for n cand samples.If a signal R peak does not pass any of these three stages, it will be discarded, which will cause the number of false positives to increase.
For instance, with a threshold of H th = 2.1, Figure 5 shows five candidates at times: n = 187, n = 195, n = 196, n = 197, n = 198.At time n = 196 + n cand , the search for the best candidate ends, and it is designated that at n = 196, there is an R peak.Each ECG signal sample has its parabolic height () calculated, and if  >  , then that time is defined as an R-peak candidate.If a candidate has been the best candidate for a certain time, it is recorded as an R peak, then the  threshold is updated.
The search for the best candidate starts when the first candidate is found and ends when a discrete time  elapses without the best candidate being replaced.For an ECG signal point to be detected as an R peak, it must first be detected to pass as a candidate, then as a best candidate, and remain as such for  samples.If a signal R peak does not pass any of these three stages, it will be discarded, which will cause the number of false positives to increase.
For instance, with a threshold of  = 2.1, Figure 5 shows , the search for the best candidate ends, and it is designated that at  = 196, there is an R peak.In ECG signals, there is a large variability in the amplitude of R peaks; therefore, it is not possible to select a fixed value for  .If the  threshold is quite large, more points with low parabolic height will qualify as candidates and it becomes more likely that the number of false positives will increase.Conversely, if the  threshold is quite small, a In ECG signals, there is a large variability in the amplitude of R peaks; therefore, it is not possible to select a fixed value for H th .If the H th threshold is quite large, more points with low parabolic height will qualify as candidates and it becomes more likely that the number of false positives will increase.Conversely, if the H th threshold is quite small, a true R peak with parabolic height less than the threshold will not qualify as a candidate, thus increasing the number of false negatives.Therefore, the way the threshold is adapted is crucial for the performance of the algorithm.
The threshold H th is adapted using a weighted arithmetic mean of the parabolic heights of the last M detected R peaks.

Pseudo Codes for the Proposed R-Peak Detection Algorithm
The proposed algorithm is described, in detail, by means of pseudo code in Algorithm 1.A discrete time window of width L = 2w + 1 moves along the ECG signal.At each time n, the parabolic height H of the signal is calculated.When the height H is greater than a threshold H th , at time n there is an R-peak candidate.Once the first candidate is detected, the algorithm searches for the best candidate in a variable interval, called the candidate interval.The candidate search ends after a time n cand , when no other best candidate has been found.Similarly, the threshold value H th is updated, by means of an average of the heights of the last M R peaks that have been detected.With this strategy, the threshold is adapted to the parabolic heights of the R peaks of the various ECG signals.This average is weighted by the constant parameter α H .If a time n th elapses without finding a new candidate after the last R peak was found, then the value of H th is reduced by adding the minimum value H min , as if an R peak with parabolic height H = H min had been found and then averaged.This process is repeated every n th that no new R peak is found.n s is the last discrete time that an R peak should be detected, but it was not.The last part of the algorithm comprises the guarantee that H min ≤ H th ≤ H max .
Algorithm 1: Pseudo code for the R-peak detection proposed method A window is moved along the signal Algorithm 2 describes the pseudo code to calculate the average of the last M P peaks detected by the algorithm.This function is also used to decrement the H th threshold when there are no new R peaks.

M_mean(H) Shifting the last M R-peak heights h
Algorithm 3 shows the pseudo code for limiting the H th threshold value.
The proposed algorithm has only eight numerical parameters: H min , H max , α H , n cand , n th , n s , L, and M, that must be updated according to the different databases where it is tested.

Analysis of Computational Complexity
The proposed algorithm was implemented on a desktop computer in MATLAB language.However, for the implementation of the algorithm in wearable devices, it is necessary to program low-power microcontrollers or programmable logic devices such as FPGA.One way to compare the computational complexity of algorithms is very common to use the number of registers and operations of addition, multiplication, and comparison.Compared to some of the more advanced portable implementations (see Table 1), the proposed algorithm is competitive.The number of resources is similar or lower than the alternative proposals.

Detection Results for the QT Database
The proposed algorithm was implemented in MATLAB.The numerical values of the parameters were defined by performing an exhaustive search.Table 2 shows the values that gave the best performance of the algorithm for the QT database.Table 3 presents the performance of the proposed algorithm for the QT database.The detection error (DER) is 0.17%, the sensitivity (S) is 99.9%, and the positive predictability (P) is 99.88%.It is noteworthy that a total of 47 (57.3%) records had a DER of 0%, i.e., without any false negative or false positive.The values shown in Table 3 were calculated considering the entire dataset and no result was minimized.The algorithm performs well on most records and its maximum DER is less than 1%, except for four records: sel308, sel847, sel15814, and sele0129.The false negative type is mostly due to the R peak being wider and lower than most of the R peaks, as is the case for the false positive present in Figure 6.The algorithm performs well on most records and its maximum DER is less than 1%, except for four records: sel308, sel847, sel15814, and sele0129.The false negative type is mostly due to the R peak being wider and lower than most of the R peaks, as is the case for the false positive present in Figure 6.On the other hand, false positives are mainly due to high-frequency noise, as shown in Figure 7.This phenomenon could be reduced by using band-pass filtering, but it would increase the computational complexity of the algorithm.Despite this, the results are still very satisfactory for the QT database with respect to other algorithms published in the literature.On the other hand, false positives are mainly due to high-frequency noise, as shown in Figure 7.This phenomenon could be reduced by using band-pass filtering, but it would increase the computational complexity of the algorithm.Despite this, the results are still very satisfactory for the QT database with respect to other algorithms published in the literature.A comparison of the performance of the proposed algorithm with other algorithms is shown in Table 4.The proposed algorithm is superior to the others, except in positive predictability (P) by the algorithm of Pandit et al. [12].A comparison of the performance of the proposed algorithm with other algorithms is shown in Table 4.The proposed algorithm is superior to the others, except in positive predictability (P) by the algorithm of Pandit et al. [12].

Detection Results for the BIH-MIT Database
The sampling frequency in the BIH-MIT database is 360 Hz, and in the QT database, it is 250 Hz.This difference necessitates a readjustment of the algorithm parameters.Unfortunately, at this stage of the research, it was not possible to develop a methodology to readjust the parameters considering only the change in the sampling period; therefore, it was necessary to conduct the readjustment using brute force.This is because the BIH-MIT database has some records with higher levels of low frequency.In such records, false peaks are very similar to real ones, but closer to each other, which demanded a higher value for the parameter α H , and consequently, other parameters are needed to be readjusted.Table 5 shows the parameters of the proposed algorithm rescaled for the BIH-MIT database.Table 6 presents the performance of the proposed algorithm against all records.The mean value of sensitivity (S) is 99.65%, the mean value of positive predictability (P) is 99.63%, and the mean value of error deviation (DER) is 0.67%.The algorithm works with acceptable efficiency, except for the following records: 108, 201, 203, 207, and 210, where it yields some false positives and negatives due to the high level of noise contained in these records.The proposed algorithm is comparable with some outstanding ones in the literature for R-peak detection, as shown in Table 7, where the comparison of the proposed algorithm is shown.

Evaluating the Robustness to Noise of R-Peak Detection Algorithm
In the MIT-BIH arrhythmia database, there are many records, such as 121, 202, 200, 200, 217, 105, and 108, which are greatly affected by noise, including baseline drift and muscle noise.These records were used to evaluate noise robustness in some previous work [5,24].Table 8 shows comparisons of the DER values of the proposed method with the other ten studies.The DER value of the proposed algorithm is comparable to that of previous works on the same records, which are heavily contaminated by noise.
In Bae [10], R-peak detection is tested in the presence of white noise.To records 102 and 105, Gaussian white noise is added to the ECG signal, for a signal-to-noise ratio (SNR) between 0.5 dB and 80 dB, and then the R-peak detection algorithm is applied.Record 102 is chosen because it is a relatively clean noise signal and record 105 is just the opposite.In this work, a comparison is made with the results from [10].Gaussian white noise is added to the ECG signal with a certain signal-to-noise ratio according to the power of the ECG signal by means of the MATLAB command: y = awgn(y,SNR,'measured'), where y is the ECG signal.
Table 9 shows the results for record 102.The sensitivity (S) starts to degrade from SNR = 60 dB with the algorithm of [10] and with the proposed algorithm, the degradation starts at SNR = 5 dB.As for the positive predictability (P), the results of [10] start to degrade at SNR = 40 dB and that of this work at SNR = 5 dB.For a noisier record, 105, Table 10 shows that the sensitivity results of [10] degrade at SNR = 60 dB and at 20 dB for the proposed algorithm; in positive predictability, the results start to degrade at SNR = 40 dB in [10] and at 20 dB for this algorithm.In both tables, it is demonstrated that the proposed algorithm resists more noise before the performance indices start to degrade.It can also be observed that the proposed algorithm is more robust under the influence of noise.

Discussion
The proposed method utilizes single-parameter parabolic fitting, at each ECG sample, to extract a feature known as parabolic height.This feature detects partial P peaks, or candidates, by comparing them with a parabolic height threshold.Then, the best candidates are designated as R points of the ECG signal.Adapting such threshold to different ECG signal amplitudes is critical to the proposed method.
The algorithm designed for wearable devices requires low computational resources, because it does not need calculating and estimating the isoelectric line of the ECG signal, nor any prior filtering.The computational complexity of algorithms is persistent in using the number of registers and operations of addition, multiplication, and comparison.Compared to some of the more advanced portable implementations [5,13,15,[21][22][23], the proposed algorithm is competitive.
The results derived from the application of the proposed algorithm to the QT database reveal that the performance of this algorithm is slightly superior with the state-of-theart algorithms specialized in wearable devices [5,12,13] and demonstrate considerable competence, even in comparison with complex algorithms not specialized in wearable devices [3,8,9].False negatives are primarily due to the R peak being broader and lower than most R peaks.False positives are mainly due to high-frequency noise.
We observe more modest results when evaluating the algorithm's performance for the BIH-MIT database.The algorithm works with acceptable efficiency, except for the five most noisy records, where it yields many false positives and negatives due to the high noise level in these records.Nevertheless, considering that the ECG signals were recorded before 1989 [19] using older technology, a modern ECG signal acquired with current technology could be quieter than the mentioned records.
We perform two distinct types of analysis to assess the algorithm's resilience against noise interference.First, we compare DER with other algorithms using six records that are notably susceptible to various forms of noise, including baseline drift and muscle noise.As employed in previous studies [5,24], these records serve as a standard for evaluating noise robustness.
Second, we subject R-peak detection to a rigorous test for the presence of white noise.To evidence the benefit of the proposed algorithm, Gaussian white noise is intentionally introduced to the ECG signal, with a specific signal-to-noise ratio determined by the characteristics of records 102 and 105, each with varying SNR levels.We then apply the R-peak detection algorithm to these modified signals.The results demonstrate that our proposed algorithm maintains its effectiveness in the presence of higher noise levels in both records before experiencing performance degradation.Furthermore, it is noteworthy that our proposed algorithm exhibits superior robustness when compared to the outcomes obtained in [10] under similar noisy conditions.
An area of opportunity that was detected in this work is that in most R-peak detectors, it is necessary to adjust the algorithm parameters to a different level.This can be resolved by establishing metaheuristic optimization strategies [31,32], which can be addressed in future work to adjust the algorithm parameters for different databases.

Figure 1 .
Figure 1.Parabola fitting at a P peak.

Figure 1 .
Figure 1.Parabola fitting at a P peak.

Figure 2 .
Figure 2. Parabolic approximations (red parabolas) in different points (green circles) of the ECG signal with different parabolic heights.

Figure 3 .
Figure 3.A true R peak (above red asterisk) and a false positive (below red asterisk) with higher parabolic height.

Figure 2 . 17 Figure 2 .
Figure 2. Parabolic approximations (red parabolas) in different points (green circles) of the ECG signal with different parabolic heights.

Figure 3 .
Figure 3.A true R peak (above red asterisk) and a false positive (below red asterisk) with higher parabolic height.

Figure 3 .
Figure 3.A true R peak (above red asterisk) and a false positive (below red asterisk) with higher parabolic height.

Figure 5 .
Figure 5. Search for the best R-peak candidate on an ECG signal.

Figure 5 .
Figure 5. Search for the best R-peak candidate on an ECG signal.

Figure 5 .
Figure 5. Search for the best R-peak candidate on an ECG signal.

Algorithm 2 :
Pseudo code for the M_mean function

Algorithm 3 :
Pseudo code for the saturation function

Figure 6 .
Figure 6.False negative is due to its reduced parabolic height.

Figure 6 .
Figure 6.False negative is due to its reduced parabolic height.

Figure 7 .
Figure 7. False positive R peaks provoked by high-frequency noise.

Table 2 .
Algorithm parameter values for simulations with the QT database.

Table 3 .
Performance evaluation of the proposed algorithm for the QT database.

Table 4 .
Performance algorithms comparison for the QT database.

Table 4 .
Performance algorithms comparison for the QT database.
* Algorithms for wearable devices.

Table 5 .
Algorithm parameter values for simulations with the BIH-MIT database.

Table 6 .
Performance evaluation of the proposed algorithm for the BIH-MIT database.

Table 7 .
Performance algorithms comparison for the BIH-MIT database.
* Algorithms for wearable devices.

Table 8 .
Comparisons of the DER from the proposed method with other studies for noisy records.The highest DER value in each column is shown in bold.